import React, {Component} from 'react';
import {
	StyleSheet,
	View,
	TextInput
} from 'react-native';

export default class BTextInputDemo extends Component {
	render() {
		return (
			<View style={styles.container}>
				<TextInput
					style={styles.inputStyle}
					// 设置默认文字
					// value={ '我是默认文字' }
					// 键盘类型 keyboardType enum("default", 'numeric', 'email-address', "ascii-capable", 'numbers-and-punctuation', 'url', 'number-pad', 'phone-pad', 'name-phone-pad', 'decimal-pad', 'twitter', 'web-search')
					// keyboardType={'default'}
					// 多行显示
					// multiline={true}
					// numberOfLines={5}
					placeholder={'我是占位文字'}
					// iOS中enum('never', 'while-editing', 'unless-editing', 'always')
					clearButtonMode={'while-editing'}
				/>
			</View>
		)
	}
}

const styles = StyleSheet.create({
	container: {
		// flex: 1,
		backgroundColor: '#F5FCFF'
	},
	inputStyle: {
		// 背景
		// backgroundColor: '#EEEEEE',
		// 边框
		borderWidth: 1,
		borderColor: '#E8E8E8',
		width: 100,
	}
});